#!/usr/bin/env node


const log = console.log;

async function logger(ctx, next){  
  const start = Date.now();
  next();
  const end = Date.now();
  log(`${ctx.method} ${ctx.path} cost: ${end-start}ms`);
};

module.exports = logger;

